//入口文件

//导入vue
import Vue from 'vue'

//导入路由包
import VueRouter from 'vue-router'
Vue.use(VueRouter)

//导入请求包
import VueResource from 'vue-resource'
Vue.use(VueResource)
//全局设置api服务器
Vue.http.options.root = 'http://www.liulongbin.top:3005';

//导入app
import app from './App.vue'

//导入 mint-ui
// import { Toast,Header,Swipe,SwipeItem } from 'mint-ui'

import mintUi from 'mint-ui'
//绑定组件库到vue
// Vue.component(Header.name, Header)
// Vue.component(Swipe.name, Swipe)
// Vue.component(SwipeItem.name, SwipeItem)
Vue.use(mintUi)
import { Toast } from 'mint-ui'
Vue.prototype.$toast = Toast

import moment from 'moment'
Vue.filter('dateFormat', function(dataStr, pattern = "YYYY-MM-DD HH:mm:ss"){
    return moment(dataStr).format(pattern)
})

// 安装 图片预览插件
import VuePreview from 'vue-preview'
Vue.use(VuePreview)

//导入mui代码片段
import './lib/mui/css/mui.css'
//导入mui扩展文件
import './lib/mui/css/icons-extra.css'
//导入路由
import router from './router.js'
//import './lib/mui/fonts/icons-extra.css'

//导入主css
import './main.css'

const vm = new Vue({
    el:"#app",
    render:(c)=>c(app),
    router
})